<template>
    <div class="child-component">
        <div>
            <slot name="header"></slot>
        </div>
        <div>
            <slot></slot>
            <p>这是 ChildComponent2 的内容</p>
        </div>
        <div>
            <slot name="footer"></slot>
        </div>
    </div>

</template>

<script setup lang="ts">
// defineSlots<{
//     header?: any;
//     footer?: any;
// }>();
</script>

<style scoped>
.child-component {
    padding: 10px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
}
</style>